package com.kjtpay.design_pattern.simple_factory;

class OperationDivide extends Operation {
    @Override
    public double GetResult() throws Exception {
        double result = 0;
        if (0 == this.getNumberB()) {
            throw new Exception("除数不能为0");
        }
        result = this.getNumberA() / this.getNumberB();
        return result;
    }
}
